import { IColumnState, IGridState } from '@ibiz-template/runtime';

/**
 * 列状态增强
 *
 * @export
 * @interface IColumnExState
 * @extends {IColumnState}
 */
export interface IColumnExState extends IColumnState {
  /**
   * 列类型
   *
   * @type {(string | 'DEFGRIDCOLUMN' | 'UAGRIDCOLUMN' | 'GROUPGRIDCOLUMN')}
   * @memberof IColumnExState
   */
  columnType: string | 'DEFGRIDCOLUMN' | 'UAGRIDCOLUMN' | 'GROUPGRIDCOLUMN';

  /**
   * 子数据
   *
   * @type {IColumnExState[]}
   * @memberof IColumnExState
   */
  children?: IColumnExState[];
}

/**
 * 表格增强UI状态
 *
 * @export
 * @interface IGridExState
 * @extends {IGridState}
 */
export interface IGridExState extends IGridState {
  /**
   * 列过滤
   *
   * @type {IData}
   * @memberof IGridExState
   */
  columnFilter: IData;
  /**
   * 分页栏容量
   *
   * @type {number[]}
   * @memberof IGridExState
   */
  pageSizes: number[];

  /**
   * 表格列状态数组 顺序就是列的排序
   *
   * @type {IColumnExState[]}
   * @memberof IGridExState
   */
  columnStates: IColumnExState[];

  /**
   * 存在列模型缓存
   *
   * @type {boolean}
   * @memberof IGridExState
   */
  columnModelCach: boolean;

  /**
   * @description 展开行的 keys 数组
   * @type {string[]}
   * @memberof IGridExState
   */
  expandRowKeys: string[];
}
